home *** CD-ROM | disk | FTP | other *** search
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- at, batch - execute commands at a later time
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- aaaatttt [-m] [-f _f_i_l_e] [-q _q_u_e_u_e_n_a_m_e] -t _t_i_m_e
- aaaatttt [-m] [-f _f_i_l_e] [-q _q_u_e_u_e_n_a_m_e] _t_i_m_e_s_p_e_c
- aaaatttt ----rrrr _a_t__j_o_b__i_d ...
- aaaatttt ----llll ----qqqq _q_u_e_u_e_n_a_m_e
- aaaatttt ----llll [_a_t__j_o_b__i_d ...]
- bbbbaaaattttcccchhhh
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _a_t and _b_a_t_c_h read commands from standard input to be executed at a later
- time. _a_t allows you to specify when the commands should be executed,
- while jobs queued with _b_a_t_c_h will execute when system load level permits.
- The _a_t utility reads commands from standard input and groups them
- together as an _a_t-_j_o_b, to be executed at a later time.
-
- The at-job will be executed in a separate invocation of the shell,
- running in a separate process group with no controlling terminal, except
- that of the environment variables, current working directory, file
- creation mask, and other implementation-dependent execution-line
- attributes in effect when the _a_t utility is executed wil be retained and
- used when the at-job is executed. The shell umask and ulimit are
- retained when the commands are executed. Open file descriptors, traps,
- and priority are lost.
-
- When the at-job is submitted, the _a_t__j_o_b__i_d and scheduled time are
- written to standard error. The _a_t__j_o_b__i_d is an identifier that will be a
- string consisting solely of alphanumeric characters and the period
- character. The _a_t__j_o_b__i_d is assigned by the system when the job is
- scheduled such that it uniquely identifies a particular job.
-
- User notification and the processing of the job's standard output and
- standard error are described under the ----mmmm option.
-
- If the file ////uuuussssrrrr////lllliiiibbbb////ccccrrrroooonnnn////aaaatttt....aaaalllllllloooowwww. exists, only users whose names appear
- in the file are permitted to use _a_t. This restriction applies to all
- users, including root. If that file does not exist, the file
- ////uuuussssrrrr////lllliiiibbbb////ccccrrrroooonnnn////aaaatttt....ddddeeeennnnyyyy is checked to determine if the user should be
- denied access to _a_t. If neither file exists, only a process with the
- appropriate privileges is allowed to submit a job. If only aaaatttt....ddddeeeennnnyyyy exists
- and is empty, global usage is permitted. The aaaatttt....aaaalllllllloooowwww and aaaatttt....ddddeeeennnnyyyy files
- consist of one user name per line. These files can only be modified by
- the superuser.
-
-
- OOOOPPPPTTTTIIIIOOOONNNNSSSS
- The _a_t utility supports the XXXXBBBBDDDD specification, SSSSeeeeccccttttiiiioooonnnn 11110000....2222,,,, UUUUttttiiiilllliiiittttyyyy
- SSSSyyyynnnnttttaaaaxxxx GGGGuuuuiiiiddddeeeelllliiiinnnneeeessss.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- _a_t may be used with the following options:
-
- ----ffff ffffiiiilllleeee
- Specify the pathname of a file to be used as the source of the at-
- job, instead of standard input.
-
- ----llll (The letter ell.) Report all jobs scheduled for the invoking user if
- no _a_t__j_o_b__i_d operands are specified. If _a_t__j_o_b__i_d_s are specified,
- report only information on these jobs. The output will be written to
- standard output.
-
- ----mmmm Send mail to the invoking user after the at-job has run, announcing
- its completion. Standard output and standard error produced by the
- at-job will be mailed to the user as well, unless directed
- elsewhere. Mail will be sent even if the job produces no output.
-
- If ----mmmm is not used, the job's standard output and standard error will
- be provided to the user by means of mail, unless they are redirected
- elsewhere; if there is no such output to provide, the implementation
- needs not notify the user of the job's completion.
-
- ----qqqq qqqquuuueeeeuuuueeeennnnaaaammmmeeee
- Specify in which queue to schedule a job for submission. When used
- with the ----llll option, limit the search to that particular queue. By
- default, at-jobs will be scheduled in queue aaaa. In contrast, queue bbbb
- is reserved for batch jobs. (see the _b_a_t_c_h utility.) The meanings
- of all other _q_u_e_u_e_n_a_m_e_s are implementation-dependent.
-
- ----rrrr Remove the jobs with the specified _a_t__j_o_b__i_d_s that were previously
- scheduled with _a_t. You can only remove your own jobs unless you are
- the superuser.
-
- ----tttt ttttiiiimmmmeeee
- Submit the job to be run at the time specified by the _t_i_m_e option
- argument, which must have the format as specified by the _t_o_u_c_h
- utility.
-
- All jobs are placed on a specific queue. By default, _a_t jobs go on queue
- ``a'', _b_a_t_c_h jobs go on queue ``b''. Additional queues may be created by
- altering the ////uuuussssrrrr////lllliiiibbbb////ccccrrrroooonnnn////qqqquuuueeeeuuuueeeeddddeeeeffffssss file. _q_u_e_u_e_d_e_f_s(4) defines the
- format for that file. Note that queue names must be lower case letters.
-
- OOOOPPPPEEEERRRRAAAANNNNDDDDSSSS
- The following operands are supported:
-
- _a_t__j_o_b__i_d
- The name reported by a previous invocation of the _a_t utility at the
- time the job was scheduled.
-
- _t_i_m_e_s_p_e_c
- Submit the job to be run at the date and time specified. All of the
- _t_i_m_e_s_p_e_c operands are interpreted as if they were separated by space
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- characters and concatenated, and are parsed as described in the
- grammar at the end of this section. The date and time are
- interpreted as being the timezone of the user (as determined by the
- _T_Z variable), unless a timezone name appears as part of _t_i_m_e below.
-
- In the POSIX locale, the following describes the three parts of the
- time specification string. All of the values from the LC_TIME
- categories in the POSIX locale are recognized in a case-insensitive
- manner.
-
- _t_i_m_e The _t_i_m_e can be specified as one, two, or four digits. One- and
- two-digit numbers are taken to be hours, four-digit numbers to
- be hours and minutes. The time can alternatively be specified
- as two numbers separated by a colon, meaning _h_o_u_r:_m_i_n_u_t_e. An
- AM/PM indication (one of the values from the am_pm keywords in
- the LC_TIME locale category) can follow the time; otherwise, a
- 24-hour clock time is understood. A timezone name can also
- follow to further qualify the time. The acceptable timezone
- names are implementation-dependent, except that they will be
- case-insensitive and the string utc is supported to indicate
- the time in Coordinated Universal Time. The suffix zzzzuuuulllluuuu may be
- used to indicate GMT.
-
- The _t_i_m_e field can also be one of the following tokens in the
- POSIX locale:
-
- mmmmiiiiddddnnnniiiigggghhhhtttt
- Indicates the time 12:00 am (00:00).
-
- nnnnoooooooonnnn Indicates the time 12:00 pm.
-
- nnnnoooowwww Indicates the current day and time. Invoking _a_t _n_o_w will
- submit an at-job for potentially immediate execution (that
- is, subject only to unspecified scheduling delays).
-
- _d_a_t_e An optional _d_a_t_e can be specified as either a month name (one
- of the values from the mmmmoooonnnn or aaaabbbbmmmmoooonnnn keywords in the LC_TIME
- locale category) followed by a day number (and possibly year
- number preceded by a comma, two digit years 00-37 and 70-99
- represent 2000-2037 and 1970-1999 respectively, all years
- inclusive) or a day of the week (one of the values from the ddddaaaayyyy
- or aaaabbbbddddaaaayyyy keywords in the LC_TIME locale category). Two special
- days are recognized in the POSIX locale:
-
- ttttooooddddaaaayyyy
- Indicates the current day.
-
- ttttoooommmmoooorrrrrrrroooowwww
- Indicates the day following the current day.
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- If no _d_a_t_e is given, ttttooooddddaaaayyyy is assumed if the given hour is
- greater than the current hour and ttttoooommmmoooorrrrrrrroooowwww is assumed if it is
- less. If the given month is less than the current month (and
- no year is given), next year is assumed.
-
- _i_n_c_r_e_m_e_n_t
- The optional _i_n_c_r_e_m_e_n_t is simply a number preceded by a plus
- sign (+) and suffixed by one of the following: mmmmiiiinnnnuuuutttteeeessss, hhhhoooouuuurrrrssss,
- ddddaaaayyyyssss, wwwweeeeeeeekkkkssss, mmmmoooonnnntttthhhhssss, or yyyyeeeeaaaarrrrssss. (The singular form is also
- accepted.) The keyword next is equivalent to an increment
- number of +1. For example, the following are equivalent
- command:
-
- at 2pm + 1 week
- at 2pm next week
-
- Thus legitimate commands include:
-
- at 0815am Jan 24
- at 8:15am Jan 24
- at now + 1 day
- at 5 pm Friday
-
- The following grammar describes the precise format of _t_i_m_e_s_p_e_c in the
- POSIX locale. This formal syntax takes precedence over the preceding text
- syntax description. When used in a _t_i_m_e_s_p_e_c, white space also delimits
- tokens.
-
- %token hr24clock_hr_min
- %token hr24clock_hour
- /*
- A hr24clock_hr_min is a one, two or four digit number. A one or two digit
- number constitutes a hr24clock_hour. A hr24clock_hour may be any of the
- single digits '0' - '9', or may be double digits, ranging from "00" -
- "23". If a hr24clock_hr_min is a four digit number, the first two digits
- must be valid hr24clock_hour, while the last two represent the number of
- minutes, from "00" - "59".
- */
-
- %token wallclock_hr_min
- %token wallclock_hour
- /*
- A wallclock_hr_min is a one, two or four digit number. A one or two digit
- number constitutes a wallclock_hour. A wallclock_hour may be any of the
- single digits '1' - '9', or may be double digits, ranging from "01" -
- "12". If a wallclock_hr_min is a four digit number, the first two digits
- must be valid wallclock_hour, while the last two represent the number of
- minutes, from "00" - "59".
- */
-
- %token minute
- /*
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- A minute is a one or two digit number whose values can be '0' - '9' or
- "00" - "59".
- */
-
- %token day_number
- /*
- A day_number is a number in the range appropriate for the particular
- month and year specified by month_name and year_number, respectively. If
- no year_number is given, the current year is assumed if the given date
- and time are later this year. If no year_number is given and the date and
- time have already occurred this year and the month is not the current
- month, next year is the assumed year.
- */
-
- %token year_number
- /*
- A year_number is a four digit number representing the year A.D., in which
- the at_job is to be run
- */
-
- %token inc_number
- /*
- The inc_number is the number of times the succeeding increment period is
- to be added to the specified date and time.
- */
-
- %token timezone_name
- /*
- The name of an optional timezone suffix to the time field, in an
- implementation dependent format.
- */
-
- %token month_name
- /*
- One of the values from the "mon" or "abmon" keywords in the LC_TIME
- locale category.
- */
-
- %token day_of_week
- /*
- One of the values from the "day" or "abday" keywords in the LC_TIME
- locale category.
- */
-
- %token am_pm
- /*
- One of the values from the "am_pm" keyword in the LC_TIME locale
- category.
- */
-
- %start timespec
- %%
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- timespec : time
- | time date
- | time increment
- | time date increment
- | nowspec
- ;
-
- nowspec : "now"
- | "now" increment
- ;
-
- time : hr24clock_hr_min
- | hr24clock_hr_min timezone_name
- | hr24clock_hour ":" minute
- | hr24clock_hour ":" minute timezone_name
- | wallclock_hr_min am_pm
- | wallclock_hr_min am_pm timezone_name
- | wallclock_hour ":" minute am_pm
- | wallclock_hour ":" minute am_pm timezone_name
- | "noon"
- | "midnight"
- ;
-
- date : month_name day_number
- | month_name day_number "," year_number
- | day_of_week
- | "today"
- | "tomorrow"
- ;
-
- increment : "+" inc_number inc_period
- | "next" inc_period
- ;
-
- inc_period : "minute" | "minutes"
- | "hour" | "hours"
- | "day" | "days"
- | "week" | "weeks"
- | "month" | "months"
- | "year" | "years"
- ;
-
-
-
- _b_a_t_c_h submits a batch job. It is almost equivalent to _a_t _n_o_w, but not
- quite. For one, it goes into a different queue.
-
- SSSSTTTTDDDDIIIINNNN
- The standard input must be a text file consisting of commands acceptable
- to the shell command language. The standard input will only be used if no
- -_f _f_i_l_e option is specified.
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
- The following environment variables affect the execution of _aaaa_tttt:
-
- _LLLL_AAAA_NNNN_GGGG provide a default value for the internationalization variables that
- are unset or null. If _L_A_N_G is unset or null the corresponding value
- from the implementation-specific default locale will be used. If any
- of the internationalization variables contains an invalid setting,
- the utility will behave as if none of the variables had been
- defined.
-
- _LLLL_CCCC______AAAA_LLLL_LLLL
- if set to a non-empty string value, override the values of all the
- other internationalization variables.
-
- _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE
- determine the locale for the interpretation of sequences of bytes of
- text data as characters (for example, single - as opposed to multi-
- byte - characters in arguments).
-
- _LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS
- determine the locale that should be used to affect the format and
- contents of diagnostic messages written to standard error.
-
- _NNNN_LLLL_SSSS_PPPP_AAAA_TTTT_HHHH
- determine the location of message catalogs for the processing of
- _LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS.
-
- _LLLL_CCCC______TTTT_IIII_MMMM_EEEE
- determine the format and contents of date and time strings written
- by _a_t
-
- _SSSS_HHHH_EEEE_LLLL_LLLL
- determine a name of a command interpreter to be used to invoke the
- at-job. If the variable is unset or null, _s_h will be used. If it is
- set to a value other than a name for _s_h, the implementation will do
- one of the following: use that shell; use _s_h; use the login shell
- from the user database; or any of the preceding accompanied by a
- warning diagnostic about which was chosen.
-
- _TTTT_ZZZZ determine the time zone. The job will be subnmitted for execution at
- the time specified by _t_i_m_e_s_p_e_c or ----tttt _t_i_m_e relative to the timezone
- specified by the TZ variable. If _t_i_m_e_s_p_e_c specifies a timezone, it
- will override _T_Z. If _t_i_m_e_s_p_e_c does not specify a timezone and _T_Z is
- unset or null, an unspecified default timezone will be used.
-
- SSSSTTTTDDDDOOOOUUUUTTTT
- When standard input is a terminal, prompts of unspecified format for each
- line of the user input described in SSSSTTTTDDDDIIIINNNN may be written to standard
- output.
-
-
-
-
-
-
- PPPPaaaaggggeeee 7777
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- In the POSIX locale, the following will be written to the standard output
- for each job when jobs are listed in response to the ----llll option:
-
- "%s\t%s\n", _a_t__j_o_b__i_d, <_d_a_t_e>
-
- where <_d_a_t_e> is equivalent in format to the output of:
-
- date +"%a %b %e %T %Y"
-
- The date and time written will be adjusted so that they appear in the
- timezone of the user (as determined by the _T_Z variable).
-
-
- SSSSTTTTDDDDEEEERRRRRRRR
- The following will be written to standard error when a job has been
- successfully submitted:
-
- "job %s at %s\n", _a_t__j_o_b__i_d, <_d_a_t_e>
-
- where <_d_a_t_e> has the same format as is described in SSSSTTTTDDDDOOOOUUUUTTTT interpreter,
- are considered a diagnostic that changes the exit status.
-
- Diagnostic messages, if any, are written to standard error.
-
-
- EEEEXXXXIIIITTTT SSSSTTTTAAAATTTTUUUUSSSS
- The following exit values are returned:
- _0000 successful completion
- _>>>>_0000 an error occurred
-
- CCCCOOOONNNNSSSSEEEEQQQQUUUUEEEENNNNCCCCEEEESSSS OOOOFFFF EEEERRRRRRRROOOORRRRSSSS
- The job will not be scheduled, removed or listed.
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
- The _a_t and _b_a_t_c_h commands read from standard input the commands to be
- executed at a later time.
-
- 1. This sequence can be used at a terminal:
-
- at -m 0730 tomorrow
- sort <file >outfile
- EOT
-
- 2. This sequence, which demonstrates redirecting standard error to a
- pipe, is useful in a command procedure (the sequence of output
- redirection specifications is significant):
-
- at now + 1 hour <<!
- diff file1 file2 2>&1 >outfile | mailx mygroup
-
-
-
-
-
-
- PPPPaaaaggggeeee 8888
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- 3. To have a job reschedule itself, _a_t can be invoked from within the
- at-job. For example, this daily processing script named mmmmyyyy....ddddaaaaiiiillllyyyy will run
- every day (although _c_r_o_n_t_a_b is a more appropriate vehicle for such work):
-
- #my.daily runs every day
- _d_a_i_l_y _p_r_o_c_e_s_s_i_n_g
- at now tomorrow < my.daily
-
- 4. The spacing of the three portions of the POSIX locale _t_i_m_e_s_p_e_c is
- quite flexible as long as there are no ambiguities. Examples of various
- times and operand presentation include:
-
- at 0815am Jan 24
- at 8 :15amjan24
- at now "+ 1 day"
- at 5 pm FRIday
-
-
- _s_h(1) provides different ways of specifying standard input. Within your
- commands, it may be useful to redirect standard output.
-
- 5. This sequence can be used at a terminal:
- batch
- sort _f_i_l_e_n_a_m_e >_o_u_t_f_i_l_e
- <control-D> (hold down 'control' and depress 'D')
-
- 6. This sequence, which demonstrates redirecting standard error to a
- pipe, is useful in a shell procedure (the sequence of output redirection
- specifications is significant):
- batch <<!
- sort _f_i_l_e_n_a_m_e 2>&1 >_o_u_t_f_i_l_e | mail _l_o_g_i_n_i_d
- !
-
- 7. To have a job reschedule itself, invoke _a_t from within the shell
- procedure, by including code similar to the following within the shell
- file:
- echo "sh _s_h_e_l_l_f_i_l_e" | at 1900 thursday next week
- or, from a terminal
- at 1900 thursday next week
- sh _s_h_e_l_l_f_i_l_e
- <control-D> (hold down 'control' and depress 'D')
-
-
- FFFFIIIILLLLEEEESSSS
- /usr/lib/cron main cron directory
- /usr/lib/cron/at.allow list of allowed users
- /usr/lib/cron/at.deny list of denied users
- /usr/spool/cron/atjobs spool area
- /usr/lib/cron/.proto generic prototype, prepended to all jobs
- /usr/lib/cron/.proto.x prototype for queue `x'
- /usr/lib/cron/queuedefs definitions for queues
-
-
-
-
- PPPPaaaaggggeeee 9999
-
-
-
-
-
-
- aaaatttt((((1111)))) aaaatttt((((1111))))
-
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- cron(1M), kill(1), mail(1), nice(1), ps(1), sh(1), sort(1), proto(4),
- queuedefs(4).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Complains about various syntax errors and times out of range.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 11110000
-
-
-
-